<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<%=basePath%>js/jquery-1.9.0.js"></script>
<script type="text/javascript"
	src="<%=basePath%>js/jquery.qrcode.min.js"></script>
<title>userinfo</title>

<script type="text/javascript">
	function save(){
		var password_ = $("#password").val();
		var newpassword_ = $("#newpassword").val();
		var newpassword2_ = $("#newpassword2").val();
		$.ajax({
			type:"POST",
			data:{"password":password_,"newpassword":newpassword_},
			url:"<%=basePath%>user/modifypassword",
			success : function(result) {
				if(result.success){
					alert("密码修改成功!")
				}else{
					alert("密码修改失败!")
				}
			},
			error : function(error) {
				alert("error")
			}
		});
	}
		
		
</script>

</head>
<body>

	当前密码:
	<input type="password" id="password" name="password"
		placeholder="请输入密码" /> 
		新密码:
	<input type="password" id="newpassword" name="newpassword"
		placeholder="请输入新密码" /> 
		再次输入:
	<input type="password" id="newpassword2" name="newpassword2"
		placeholder="请再次输入新密码" />



	<button id="savebtn" name="savebtn" onclick="save()">保存</button>
	<button id="cancelbtn" name="cancelbtn" onclick="">取消</button>



</body>
</html>